package com.open.capacity.user.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.open.capacity.model.system.SysUser;

/**
 * @author 作者 ftquan E-mail: 464725602@qq.com
 * @version 创建时间：2017年11月12日 上午22:57:51
 * 用户管理
 */
@Mapper
public interface SysUserDao {

    @Options(useGeneratedKeys = true, keyProperty = "id")
    int save(SysUser sysUser);

    int delete(String id);

    int updateByOps(SysUser sysUser);

    int updateSignature(@Param("id") String id, @Param("signature") String signature);

    SysUser findByUsername(String username);

    SysUser findByRealname(@Param("companyId") String companyId, @Param("departmentId") String departmentId, @Param("realName") String realName);

    SysUser findByCategoryName(@Param("companyId") String companyId, @Param("categorys") List<String> categorys, @Param("realName") String realName);

    SysUser findByIDNumber(@Param("companyId") String companyId, @Param("code") String code);

    SysUser findById(String id);

    SysUser findFullById(String id);

    int count(Map<String, Object> params);

    List<SysUser> findList(Map<String, Object> params);

}
